from django.urls import path
from . import views

# Django 2.0 新增的,方便写 url route
# https://docs.djangoproject.com/en/2.0/ref/urls/#django.urls.path

urlpatterns = [
    path('create/',
         views.CourseCreateView.as_view(),
         name='course_create'
         ),
    path('<int:pk>/',
         views.CourseRetrieveUpdateView.as_view(),
         name='course_detail'
         ),
    path('update/',
         views.CourseUpdateView.as_view(),
         name='course_update',
         ),
    path('apply/',
         views.CourseApplyView.as_view(),
         name='course_apply',
         ),
    path('my_all_course/',
        views.CourseMyAllCourseView.as_view(),
        name='course_myallcourse'
    ),

    path('search/',
        views.CourseSearchView.as_view(),
        name='course_search'
    ),

    path('assignments/',
        views.CourseAllAssignmentsView.as_view(),
        name='course_all_assignments'
    ),
    path('create_assignment/',
        views.CourseCreateAssignmentView.as_view(),
        name='course_create_assignment'
    ),

    path('<int:pk>/',
         views.CourseCreateAssignmentView.as_view(),
         name='course_arrange_assignment'
         ),

    path('assignment_text/',
         views.CourseAssignmentTextView.as_view(),
         name='course_assignment_text'
         ),

    path('assignment_detail/',
         views.CourseAssignmentDetailView.as_view(),
         name='course_assignment_detail'
         ),

    path('all_student/',
         views.CourseAllStudentView.as_view(),
         name='course_all_student'
         ),
]
